import axios from 'axios';

import {API_NEW_VERSION, ALL_SERVICE_API} from '../api';

const RADIATE_CITYS_BY_STOWAAGE_CORE_ID = API_NEW_VERSION + 'radiate_citys_by_stowage_core';

const FIND_RADIATE_CITY = API_NEW_VERSION + 'find_radiate_citys/';

// 根据ID，获取地址列表
export const getByStowageCore = params => {
  return axios.get(RADIATE_CITYS_BY_STOWAAGE_CORE_ID, {params: params});
};

// 保存辐射城市
export const saveRadiateCity = (params) => {
  return axios.post(ALL_SERVICE_API + '/stowage-radiate-cities', params);
};

// 根据ID获取辐射城市信息
export const getRadiateCity = id => {
  return axios.get(FIND_RADIATE_CITY + id);
};

// 删除辐射城市信息
export const delRadiateCity = id => {
  return axios.delete(ALL_SERVICE_API + '/stowage-radiate-cities/' + id);
};
